package cn.stylefeng.guns.modular.business.common;

import cn.stylefeng.guns.modular.business.model.result.CategoryFrontResultView;
import cn.stylefeng.guns.modular.business.model.result.CategoryResult;
import cn.stylefeng.guns.modular.business.model.result.CategoryResultView;
import cn.stylefeng.guns.modular.business.model.result.IndexResult;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;


@Data
public class GunsData {

    /**
     * 首页数据
     */
    public static Map<String, IndexResult> indexMap = new ConcurrentHashMap<>();

    /**
     * 分类数据
     */
    public static Map<String, List<CategoryResultView>> cateList = new ConcurrentHashMap<>();

    /**
     * 面值数据
     */
    public static Map<String, List<CategoryFrontResultView>> cardAndQuotaList = new ConcurrentHashMap<>();

    /**
     * 清除缓存
     */
    public static void clear() {
        indexMap.clear();
        cateList.clear();
        cardAndQuotaList.clear();
    }
}
